Fixing some bugs/warnings I got when setting up my own environment (Ubuntu 20.04, Python 3.8) #446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These are some very minor fixes for some errors/warnings I encountered when setting up my own environment.
Motivation and Context
When attempting to follow the existing installation guide, in which the typed_python root directory is added to PYTHONPATH, I ran into an issue where python was looking at the source files before the the built files, and throwing errors for the missing _types module. If this has been working for other people, maybe it is just my environment. Regardless, calling
python setup.py install
should put typed_python in the site-packages directory, which python looks at anyway.I also cleaned up a couple warning messages I was getting with pytest, and it should now run without warnings.
Lastly, I moved all the tests to their own directory, to keep the source directory clean.
Approach
I have updated the installation README to reflect what worked for me in setting up a new development environment, and I have added a section on how to run pytest (the required packages for the tests are not all in requirements.txt)
I also added a pytest.ini file, which I'm using to suppress a spurious SyntaxWarning in operator_is_compilation_test.py. Its scope is limited so that it does not suppress other warnings. In the future, this ini file can be used to handle other similar cases.
How Has This Been Tested?
pytest
Types of changes
Checklist: